package org.glickr.api.stats

import org.glickr.api.FlickrApiMethod
import groovy.util.slurpersupport.GPathResult

/* ----------------------------------------------------------------------------------------------------
REQUEST: flickr.stats.getPhotosetReferrers
INFO: Get a list of referrers from a given domain to a photoset

AUTHENTICATION: This method requires authentication with 'read' permission.

ARGUMENTS:
api_key (Required): Your API application key.
date (Required): Stats will be returned for this date. This should be in either be in YYYY-MM-DD or unix timestamp format.
A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will automatically be rounded down to the start of the day.
domain (Required): The domain to return referrers for. This should be a hostname (eg: "flickr.com") with no protocol or pathname.
photoset_id (Optional): The id of the photoset to get stats for. If not provided, stats for all sets will be returned.
per_page (Optional): Number of referrers to return per page. If this argument is omitted, it defaults to 25. The maximum allowed value is 100.
page (Optional): The page of results to return. If this argument is omitted, it defaults to 1.

EXAMPLE RESPONSE:
<domain page="1" perpage="25" pages="1" total="3" name="flickr.com">
  <referrer url="http://flickr.com/" views="11" />
  <referrer url="http://flickr.com/photos/friends/" views="8" />
  <referrer url="http://flickr.com/search/?q=stats+api" views="2" searchterm="stats api" />
</domain>
There is one <referrer> element for each referring page, with attributes for the url and the number of views.
Where the referring page is a search engine and we have identified the search term it will be given in the searchterm attribute.
---------------------------------------------------------------------------------------------------- */

class statsGetPhotosetReferrers implements FlickrApiMethod {
    //
    //  API METHOD
    //
    static final String apiMethod = 'flickr.stats.getPhotosetReferrers'

    //
    //  VALIDATOR
    //

    //
    //  PARAMS
    //

    //
    //  PROCESSOR
    //

    //
    //  ERROR CODES
    //
}